<template>
<div style="width:1000px;height:800px">
    <el-row>111<imgUpload @imgUrl="imgUrl1" @remove="remove1" :fileList="img1" :disabled="disabled"></imgUpload></el-row>
    <el-button @click="aaaaa">查看</el-button><el-button type="success" @click="aaaa">确定</el-button>
    <el-button type="success" @click="aaaa">添加</el-button>
    <el-row v-for="(item,index) in data" :key="index">
        <el-col :span="5">
            <el-select v-model="item.num1" placeholder="请选择" @change="blur(item.num1,item.yuan,index)">
                <el-option v-for="item in province" :key="item.provinceId" :label="item.provinceId" :value="item.provinceId">
                </el-option>
            </el-select>
        </el-col>
        
        <el-col :span="5">
            原价{{item.yuan}}元
        </el-col>
        <el-col :span="5">
            <el-input v-model="item.num2"></el-input>
        </el-col>
    </el-row>
</div>
</template>

<script>
import baidMap from 'components/Charts/baidMap';
import imgUpload from 'components/Upload/imgUpload';
export default {
    components: { baidMap, imgUpload},
    data() {
        return {
            img1: [],
            image1: '',
            num1: '',
            disabled: true,
            num2: '',
            data: [{num1: 1, yuan: 5, num2: ''}, {num1: 1, yuan: 2, num2: ''}],
            province: [{provinceId: 1}, {provinceId: 2}, {provinceId: 3}]
        }
    },
    created() {
        // this.image1=this.img1[0].url;
    },
    methods: {
        imgUrl1(data) {
            //console.log(data);
            this.image1=data;
        },
        remove1(data) {
            //console.log(data);
            this.image1='';
        },
        aaaaa() {
            //console.log(this.image1, this.image2, this.image3)
        },
        aaaa() {
            let aa = {
                num1: 2, yuan: 8, num2: ''
            }
            this.data.push(aa)
        },
        blur(a, b, c) {
            //console.log(a, b, c)
            this.data[c].num2 = a*b*8;
        }
    }
};
</script>

<style scoped>

</style>